home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / nn.zip / BACK_ACT.SH < prev    next >
Text File  |  1989-06-28  |  522b  |  31 lines

  1. # prefix is inserted above by make
  2.  
  3. #
  4. #    back_act will maintain a set of `old' active files
  5. #    in the DB directory where they can be used by nngoback
  6. #    to backtrack the rc file a number of days.
  7. #
  8. #    It should be invoked by cron every day at midnight.
  9. #    It should run as user `news'!
  10. #
  11.  
  12. cd $DB || exit 1
  13.  
  14. p=15
  15. l=""
  16. for i in 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  17. do
  18.     if [ -f active.$i ]
  19.     then
  20.         mv active.$i active.$p
  21.         l=$p
  22.     elif [ -n "$l" ]
  23.     then
  24.         ln active.$l active.$p
  25.     fi
  26.     p=$i
  27. done
  28.  
  29. cp $ACTIVE active.0
  30. chmod 644 active.0
  31.